package com.pda.common.basemvp.present;

import com.pda.common.basemvp.model.Model;
import com.pda.common.basemvp.view.BaseView;

public abstract class BasePresenter<M extends Model, V extends BaseView> implements Presenter<M, V> {
    protected V view;
    protected M model;

    @Override
    public void registerModel(M model) {
        this.model = model;
    }

    @Override
    public void registerView(V v) {
        this.view =  v;
    }

    @Override
    public V getView() {
        return view ;
    }

    @Override
    public void destroy() {
        if (view !=null)
        view = null;
    }
}



